package com.friend.entity.entity.base;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author friend
 * @since 2019-10-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_comment")
@ApiModel(value="Comment对象", description="")
@RequiredArgsConstructor(staticName = "of")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "评论人")
    @TableField("comm_user")
    private Integer commUser;

    @ApiModelProperty(value = "评论时间")
    @TableField("common_time")
    private LocalDateTime commonTime;

    @ApiModelProperty(value = "评论内容")
    @TableField("comm_content")
    private String commContent;

    @ApiModelProperty(value = "评论场子id")
    @TableField("space")
    private Integer space;

    @ApiModelProperty(value = "场子标题")
    @TableField(exist = false)
    private String spaceTitle;

    @ApiModelProperty(value = "删除标识")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
